package
{

	import flash.display.MovieClip;

public dynamic class FlipNumber extends MovieClip
{
//    var _currentframe;
    var bottom0;
    var bottom1;
    var currentNum;
//    var gotoAndPlay;
    var newNum;
    var top0;
    var top1;

    function FlipNumber()
    {
        super();
        this.currentNum = 0;
        this.firstFrame();
    }

    function setToNum(n)
    {
        if (n != this.currentNum) 
        {
            if (this.currentFrame == 1) 
            {
                delete this.newNum;
                this.currentNum = this.top1.num.text = this.bottom1.num.text = n;
                return this.gotoAndPlay(2);
            }
            this.newNum = n;
        }
    }

    function firstFrame()
    {
        if (this.newNum != undefined) 
        {
            this.setToNum(this.newNum);
            return;
        }
        this.top0.num.text = this.bottom0.num.text = this.currentNum;
    }

}


}